<?php

class fluxblog_scraper extends BlogScraper
{
    function __construct()
    {
        parent::__construct('fluxblog');
    }
    
    function getPostLinks()
    {
        $text = $this->xpath->query("//h1//a");

        return $text;
    }   
}

class fluxblog_post_scraper extends PostScraper
{
    
    function getTitle()
    {
        $text = $this->xpath->query("//h1//a")->item(0)->nodeValue;

        return $text;
    }
    
    function getLink()
    {
        $text = $this->xpath->query("//h1//a")->item(0)->getAttribute('href'); 

        return $text;
    }
    
    function getDate()
    {
        $date_node = $this->xpath->query("//h6")->item(0)->getElementsByTagName('strong')->item(0)->nodeValue; 

        if (strlen($date_node) > 4) 
        {
            $date = date('Y-m-d', strtotime($date_node));
            return $date;
        }        
    }
}

?>